package com.qingcloud.adminbackend.utils;

import cn.hutool.core.bean.BeanUtil;
import com.qingcloud.adminbackend.entity.sysfunction.SysFunction;
import com.qingcloud.base.remote.pojo.FunctionDTO;

public class DtoUtils {
    public static SysFunction functionDto2Entity(FunctionDTO functionDTO) {
        SysFunction sysFunction =  new SysFunction();
        BeanUtil.copyProperties(functionDTO,sysFunction);
        return sysFunction;
    }

    public static FunctionDTO entity2FunctionDto(SysFunction sysFunction) {
        FunctionDTO functionDTO =  new FunctionDTO();
        BeanUtil.copyProperties(sysFunction,functionDTO);
        return functionDTO;
    }
}
